package server.demo.utils;

import lombok.Data;

@Data
public class StatusCode {
    // 状态码
    public static final int ERROR = 410;
    public static final int STATUS_SUCCESS = 0;  //根据返回值判断成功与否
    public static final int STATUS_FAILURE = 1;
    // 业务状态
    private int status;
    // 业务数据
    private Object data;
    public StatusCode(Object data) {
        this.status = STATUS_SUCCESS;
        this.data = data;
    }
    public StatusCode(int status, Object data) {
        this.status = status;
        this.data = data;
    }
}
